package com.campus.controller;

import com.campus.mapper.CourseMapper;
import com.campus.service.ICourseService;
import com.campus.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.PropertySource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/course")
public class CourseController {

    @Autowired
    private ICourseService iCourseService;

    @PostMapping("/create")
    public R create(Integer id, String courseName, String status, Integer activityId, Integer teacherId, Integer classId)
    {
       return R.success(iCourseService.createCourse(id, courseName, status, activityId, teacherId, classId));
    }
}


